<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>添加/修改OEM信息</title>
<c:import url="/ctrl/simpleheader"></c:import>
<script type="text/javascript" src="/scripts/oem/detail.js"></script>
<link rel="stylesheet" href="/scripts/ui/jquery.ui.core.css">
<link rel="stylesheet" href="/scripts/ui/jquery.ui.theme.css">
<link rel="stylesheet" href="/scripts/ui/jquery.ui.datepicker.css">
<script src="/scripts/ui/jquery.ui.core.min.js"></script>
<script src="/scripts/ui/jquery.ui.datepicker.min.js"></script>
<script>
	$(function() {
		$("#begin").datepicker({
			dateFormat : "yy-mm-dd",
			changeMonth : true,
			changeYear : true,
			onClose : function(selectedDate) {
				$("#end").datepicker("option", "minDate", selectedDate);
			}
		});
		$("#end").datepicker({
			dateFormat : "yy-mm-dd",
			changeMonth : true,
			changeYear : true,
			onClose : function(selectedDate) {
				$("#begin").datepicker("option", "maxDate", selectedDate);
			}
		});
	});
</script>
</head>
<body>
  <div title="OEM信息">
    <div style="padding: 10px 0 10px 60px">
      <table>
        <tr>
          <td>OEM名称:</td>
          <td><input type="text" id="name" name="name"
            value="<c:out
                      value="${oem.oemName}" />"
            style="width: 300px;"></input></td>
        </tr>
        <tr>
          <td>经销商:</td>
          <td><input type="text" id="custName" name="custName"
            value="<c:out
                      value="${oem.custName}" />"></input></td>
        </tr>
        <tr>
          <td>有效期:</td>
          <td><fmt:formatDate var="oemBeginDate"
              pattern="yyyy-MM-dd" value="${oem.oemBeginDate}" /> <fmt:formatDate
              var="oemEndDate" pattern="yyyy-MM-dd"
              value="${oem.oemEndDate}" /><input id="begin"
            name="begin" style="width: 100px" class="date-pick"
            value="<c:out
                      value="${oemBeginDate}" />" />&nbsp;-&nbsp;
            <input id="end" name="end" class="date-pick"
            style="width: 100px"
            value="<c:out
                      value="${oemEndDate}" />" /></td>
        </tr>
        <tr>
          <td>域名:</td>
          <td><input type="text" id="domain" name="domain"
            value="<c:out
                      value="${oem.oemDomain}" />"></input></td>
        </tr>
        <tr>
          <td>备案号:</td>
          <td><input type="text" id="icp" name="icp"
            value="<c:out
                      value="${oem.oemIcp}" />"
            style="width: 300px;"></input></td>
        </tr>
        <tr>
          <td>联系人:</td>
          <td><input type="text" id="contact" name="contact"
            value="<c:out
                      value="${oem.oemContactName}" />"></input></td>
        </tr>
        <tr>
          <td>联系电话:</td>
          <td><input type="text" id="tel" name="tel"
            value="<c:out
                      value="${oem.oemContactTel}" />"></input></td>
        </tr>
        <tr>
          <td>联系人邮箱:</td>
          <td><input type="text" id="email" name="email"
            value="<c:out
                      value="${oem.oemContactEmail}" />"></input></td>
        </tr>
        <tr>
          <td>绑定IP:</td>
          <td><input type="text" id="ip" name="ip"
            value="<c:out
                      value="${oem.oemIp}" />"></input></td>
        </tr>
        <tr>
          <td>客服电话:</td>
          <td><input type="text" id="service" name="service"
            value="<c:out
                      value="${oem.oemServiceTel}" />"></input></td>
        </tr>
        <tr>
          <td>是否alipay自主收款:</td>
          <td><input type="radio" name="ispayee" value="1"
            <c:if test="${oem.oemIsPayeeAlipay=='1'}"> checked="checked"</c:if>>是&nbsp;<input
            type="radio" name="ispayee" value="0"
            <c:if test="${oem.oemIsPayeeAlipay=='0'}"> checked="checked"</c:if>>否</td>
        </tr>
        <tr>
          <td>支付宝EMAIL:</td>
          <td><input type="text" id="alipayemail"
            name="alipayemail"
            value="<c:out
                      value="${oem.oemAlipayEmail}" />"></input></td>
        </tr>
        <tr>
          <td>支付宝Partner:</td>
          <td><input type="text" id="alipaypartner"
            name="alipaypartner"
            value="<c:out
                      value="${oem.oemAlipayPartner}" />"></input></td>
        </tr>
        <tr>
          <td>支付宝Secret:</td>
          <td><input type="text" id="alipaysecret"
            name="alipaysecret"
            value="<c:out
                      value="${oem.oemAlipaySecret}" />"></input></td>
        </tr>
        <tr>
          <td>支付宝费率:</td>
          <td><input type="text" id="alipayrate" name="alipayrate"
            value="<c:out
                      value="${oem.oemAlipayRate}" />"></input></td>
        </tr>
      </table>
    </div>
    <div style="text-align: center; padding: 5px">
      <c:choose>
        <c:when test="${oem.oemId!=null}">
          <a href="javascript:void(0)"
            onclick="submitModify('<c:out
              value="${oem.oemId}" />')">保存</a>
        </c:when>
        <c:otherwise>
          <a href="javascript:void(0)" onclick="submitCreate()">添加OEM</a>
        </c:otherwise>
      </c:choose>
    </div>
  </div>
</body>
</html>